@import 'config';

/* BEM support Func
 -------------------------- */
@function selectorToString($selector) {
  $selector: inspect($selector); 
  $selector: str-slice($selector, 2, -2); 
  @return $selector;
}


@function containWhenFlag($selector) {
  $selector: selectorToString($selector);

  @if str-index($selector, '.' + $state-prefix) {
    @return true;
  } @else {
    @return false;
  }
}


@function hitAllSpecialNestRule($selector) {
  @return containWhenFlag($selector);
}
